<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="app">
			<!-- v-model直接写在input属性中,绑定对应的value -->
			<label for="male">
				<input type="radio" name="sex" id="male" value="男" v-model="sex">男
			</label>
			<label for="famale">
				<input type="radio" name="sex" id="famale" value="女" v-model="sex">女
			</label>
			<h3>性别:{{sex}}</h3>
		</div>
	</body>
	<script src="../js/vue.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		const app = new Vue({
			el:'#app',
			data:{
				message:'你好啊!',
				sex:''		//默认选中效果,只需要把设置sex:'男' 就可以默认选中
			}
		})
	</script>
</html>
